Skip to main content

ActionCardImage

The ActionCardImage is used to add an image (jpg/png), SVG or a lottie to the card's body.

Usage#


//Import the desired image/svg/lottieimport img from "..."import svg from "..."import lottie from "..."
//Then pass it using the correct prop
//png / jpg<ActionCardImage img={img}/>
//SVG<ActionCardImage SVGImg={svg}/>
//Lottie with default options<ActionCardImage lottie={lottie}/>
// Lottie with lottieOptions<ActionCardImage lottie={lottie} lottieOptions={{ loop: false, speed: 2, /*rest of the options here*/ }}/>

Props#

NameTypeDefaultDescription
imgPNG or JPG fileundefinedAdds a PNG or JPG image
SVGImgSVG fileundefinedAdds a SVG image
lottieLottie fileundefinedAdds a Lottie
lottieOptionsLottiePropsundefinedObject containing the lottie's options. See props here
Variant'default', 'icon', 'fullscreen''default'The image variant. Default is a small fixed image, icon should only be used for icons, and it enables shrinking of the image when scrolling, and fullscreen is a fullscreen image
scrollDistanceRefAnimated.ValueRef passed from ActionCardContentHow far the user has scrolled. Used to shrink the image. Avoid passing this manually if possible.